package com.hetaozi.login.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @email： wf520200@163.com
 * @date: 2021/11/11 11:30
 * 功能：
 * 描述：
 * @author： 吴帆
 **/
@ApiModel(value = "用户信息")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "sys_user")
public class SysUser implements Serializable {
    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 用户名称
     */
    @TableField(value = "user_name")
    @ApiModelProperty(value = "用户名称")
    private String userName;

    /**
     * 密码
     */
    @TableField(value = "pass_word")
    @ApiModelProperty(value = "密码")
    private String passWord;

    /**
     * 加密盐值
     */
    @TableField(value = "salt")
    @ApiModelProperty(value = "加密盐值")
    private String salt;

    /**
     * 1逻辑已删除值，0逻辑未删除值
     */
    @TableField(value = "deleted")
    @ApiModelProperty(value = "1逻辑已删除值，0逻辑未删除值")
    private Integer deleted;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    /**
     * 角色集合
     */
    @TableField(exist = false)
    private Set<String> roles = new HashSet<>();

    /**
     * 权限集合
     */
    @TableField(exist = false)
    private Set<String> permissions = new HashSet<>();

    private static final long serialVersionUID = 1L;
}